<?php

require './FileUpload.Class.php';
require './file_upload.html';
//获取表单提交的参数
$file = isset($_FILES['photo']) ? $_FILES['photo'] : "";
echo "<pre>";
print_r($file);
echo "</pre>";

$fileUpload = new FileUpload();
$allPath = $fileUpload->upload($file);
if (!$allPath) {
	//上传失败，打印错误信息
	echo $fileUpload->errorMessage;
	//结束运行
	die();
}
echo $allPath;
echo "现有头象：<img src=".$allPath. ">";

